package com.group3.service.mqservice;

import com.alibaba.fastjson.JSON;

import com.group3.model.User;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RocketMQMessageListener(topic = "user-welcome", consumerGroup = "notification-user-welcome-group")
public class NotificationUserWelcomeService implements RocketMQListener<User> {
    @Override
    public void onMessage(User user) {
        String name = user.getUsername();
        log.info("用户：{}，您好!", name);
    }
}
